package zozopo.business;

import java.io.UnsupportedEncodingException;
import java.util.Hashtable;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;

import zozopo.operations.business.StoreOS;
import zozopo.operations.business.StoreTB;

import com.opensymphony.xwork2.ActionSupport;

public class MangeStoreAction extends ActionSupport {
	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	
	//传入参数
	private String kind;
	private String brand;
	//分页参数
	private int beginPageNum = 0;
	private int pageSize = 20;
	private int rowNum = 0;
	//传出参数
	List<StoreTB> storeList;
	
	Map<String,List<StoreTB>> storeMap;
	
	public String execute(){
		StoreOS  storeOS = new StoreOS();

		storeMap = storeOS.selectMap();

		storeOS.releaseConnection();
		return SUCCESS;
	}

	public String getKind() {
		return kind;
	}

	public void setKind(String kind) {
		this.kind = kind;
	}

	public int getBeginPageNum() {
		return beginPageNum;
	}

	public void setBeginPageNum(int beginPageNum) {
		this.beginPageNum = beginPageNum;
	}

	public int getPageSize() {
		return pageSize;
	}

	public void setPageSize(int pageSize) {
		this.pageSize = pageSize;
	}

	public int getRowNum() {
		return rowNum;
	}

	public void setRowNum(int rowNum) {
		this.rowNum = rowNum;
	}

	public List<StoreTB> getStoreList() {
		return storeList;
	}

	public void setStoreList(List<StoreTB> storeList) {
		this.storeList = storeList;
	}

	public String getBrand() {
		return brand;
	}

	
	public void setBrand(String brand) throws UnsupportedEncodingException {
		brand = java.net.URLDecoder.decode(brand, "UTF-8");;
		this.brand = brand;
	}

	public Map<String, List<StoreTB>> getStoreMap() {
		return storeMap;
	}

	public void setStoreMap(Map<String, List<StoreTB>> storeMap) {
		this.storeMap = storeMap;
	}
}
